package com.tianpengtech.admin.fairsalary;
import java.util.Map;

import com.jfinal.plugin.activerecord.Model;
import com.tianpengtech.common.exception.ValidateException;
import com.tianpengtech.admin.AbstractAdmin;
import com.tianpengtech.common.model.fairsalary.FairSalary;
import com.tianpengtech.common.search.QueryConstructor;

public class FairSalaryAdminServiceImpl extends AbstractAdmin{

	@Override
	public void beforeAdd(Model<?> model) throws ValidateException {

	}

	@Override
	public void beforeQueryById(Model<?> model, int id) {

	}

	@Override
	public void beforeUpdate(Model<?> model) throws ValidateException {

	}

	@Override
	public void beforeDelete(Model<?> model) {

	}

	@Override
	public void builderSQLExpected(Model< ? > model,
			QueryConstructor queryConstruct, Map< String, Object > params) {
		setQuerySQLCommand("select t1.* ,t2.company_name ");
		queryConstruct.setCommand(" from "+FairSalary.dao.tableName()+" as t1, fair_user_authenticate as t2 where t1.user_id=t2.user_id");
		
	}

	@Override
	public String tableName() {
		return FairSalary.dao.tableName();
	}

}